package com.liuchuanzheng.lcz_wanandroid.module.home.repository

import com.liuchuanzheng.lcz_wanandroid.base.BaseRepository
import com.liuchuanzheng.lcz_wanandroid.module.home.bean.Article
import com.liuchuanzheng.lcz_wanandroid.module.home.bean.Pagination
import com.liuchuanzheng.lcz_wanandroid.net.common.CommonResultBean
import com.liuchuanzheng.lcz_wanandroid.net.common.MainRetrofitManager

/**
 * @author 刘传政
 * @date 2021/9/15 0015 9:30
 * QQ:1052374416
 * 电话:18501231486
 * 作用:
 * 注意事项:
 */
class ArticleRepository : BaseRepository() {
    suspend fun getTopArticleList(): CommonResultBean<List<Article>> {
        return MainRetrofitManager.apiService.getTopArticleList()
    }

    suspend fun getArticleList(page: Int): CommonResultBean<Pagination<Article>> {
        return MainRetrofitManager.apiService.getArticleList(page)
    }
}